import http from "@/api";
import { ResPage } from "@/api/interface";
import {
  CreateMediumRecordParam,
  EditMediumRecordInfoParam,
  HxMediumRecord,
  QueryMyMediumRecordListParam,
  QueryProjectRecordAllMediumRecordsParam
} from "@/api/interface/mediumRecord";

const apiName = "MediumRecord";

/** 查询媒介记录 */
export const queryProjectRecordAllMediumRecords = (param: QueryProjectRecordAllMediumRecordsParam) => {
  return http.post<ResPage<HxMediumRecord>>(`${apiName}/QueryProjectRecordAllMediumRecords`, param);
};

export const queryMyMediumRecordList = (param: QueryMyMediumRecordListParam) => {
  return http.post<ResPage<HxMediumRecord>>(`${apiName}/QueryMyMediumRecordList`, param);
};

export const createMediumRecord = (param: CreateMediumRecordParam) => {
  return http.post<string>(`${apiName}/CreateMediumRecord`, param);
};

export const editMediumRecordInfo = (param: EditMediumRecordInfoParam) => {
  return http.post<string>(`${apiName}/EditMediumRecordInfo`, param);
};
